MUDUO_DIRECTORY ?= $(HOME)/lib/build/release-install-cpp11
MUDUO_INCLUDE = $(MUDUO_DIRECTORY)/include
MUDUO_LIBRARY = $(MUDUO_DIRECTORY)/lib

CXXFLAGS = -I$(MUDUO_INCLUDE) \
	       -std=c++11 \
		   -w

LDFLAGS = -L$(MUDUO_LIBRARY) -lmuduo_net -lmuduo_base -lpthread -lrt -lz -ljsoncpp

all: registry provider consumer server client 
clean:
	rm registry provider consumer server client

server: Server.cc
	g++ $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -g

client: Client.cc
	g++ $(CXXFLAGS) -o $@ $^ $(LDFLAGS)

registry: Registry.cc
	g++ $(CXXFLAGS) -o $@ $^ $(LDFLAGS) 

provider: Provider.cc
	g++ $(CXXFLAGS) -o $@ $^ $(LDFLAGS)

consumer: Consumer.cc
	g++ $(CXXFLAGS) -o $@ $^ $(LDFLAGS)

.PHONY: all clean

